#ifndef YT_WEB_H
#define YT_WEB_H

#include <QtCore>
#include <QtNetwork>
//#include <QtWebKit>

//#include "yt_rec.h"

class T_VideoList;

class YtWeb : public QObject
{
    Q_OBJECT
public:
    static QByteArray doGet(QNetworkAccessManager *a_nam, QNetworkRequest a_request, QString *a_contentType = 0);
    static QByteArray doGet(QNetworkAccessManager *a_nam, QUrl a_url, QString *a_contentType = 0)
    {
        QNetworkRequest v_request(a_url);
        return YtWeb::doGet(a_nam, v_request, a_contentType);
    }
    static QByteArray doGet(QNetworkAccessManager *a_nam, QString a_url_str, QString *a_contentType = 0)
    {
        QUrl v_url(a_url_str);
        return YtWeb::doGet(a_nam, v_url, a_contentType);
    }
    static QString getTokenForVideoStreamEmbed(QNetworkAccessManager *a_nam, QString a_id, QMap<int, QUrl> &a_fmt_map);
    static QString getTokenForVideoStreamDetail(QNetworkAccessManager *a_nam, QString a_id, QMap<int, QUrl> &a_fmt_map);
    static QString getVideoStreamMap(QNetworkAccessManager *a_nam, QString a_id, QMap<int, QUrl> &a_fmt_map);
    static void getVideoAttributes(QNetworkAccessManager *a_nam, QString a_id);
};

#endif // YT_WEB_H
